﻿package com.lynn.salary.entity;

import java.util.Date;

public class Msg {

	private String id;
	private Date sendTime;
	private String receiver;
	private String sender;
	private String content;
	private String accessory;

	/**
	 * 获取所有字段
	 * 
	 * @return
	 */
	public static String[] getFields() {

		return new String[] { "id", "sendTime", "receiver", "sender",
				"content", "accessory" };
	}

	/**
	 * 获取表名
	 * 
	 * @return
	 */
	public static String getTableName() {

		return "msg";
	}

	/**
	 * 获取主键名字
	 * 
	 * @return
	 */
	public static String getPkName() {

		return "id";
	}

	public static Object[] getFk(String field) {
		if (field.equals("receiver")) {
			return new Object[] { User_.class, "id" };
		} else if (field.equals("sender")) {
			return new Object[] { User_.class, "id" };
		} else if (field.equals("accessory")) {
			return new Object[] { SystemFile.class, "id" };
		} else
			return null;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Date getSendTime() {
		return sendTime;
	}

	public void setSendTime(Date sendTime) {
		this.sendTime = sendTime;
	}

	public String getReceiver() {
		return receiver;
	}

	public void setReceiver(String receiver) {
		this.receiver = receiver;
	}

	public String getSender() {
		return sender;
	}

	public void setSender(String sender) {
		this.sender = sender;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getAccessory() {
		return accessory;
	}

	public void setAccessory(String accessory) {
		this.accessory = accessory;
	}

}
